import org.junit.Test;

public class Day3 {
	// argument
	public static void main1(String[] args) {
		int num = 3;
		String str = "Java";
		String[] array;
		int[] array1;
		int arr[];
		if(true) {
			System.out.println("Day3.main()");
		}
	}
	
	
	
	
	
	// continue:跳过这一次循环，继续下一次循环
	@Test
	public void test1() {
		for (int i = 1; i <= 10; i++) {
			if (i == 5) {
				continue;
			}
			System.out.println(i);
		}
	}
	
	// break: 调出本层循环
	@Test
	public void test2() {
		for (int i = 1; i <= 10; i++) {
			if (i == 5) {
				break;
			}
			System.out.println(i);
		}
	}
	
	
	@Test
	public void test3() {
		int num = 2;
		switch(num) {
		case 1:
			System.out.println("1");
			break;
		case 2:
			System.out.println("2");
			//break;
		case 3:
			System.out.println("3");
			break;
		default:
			System.out.println("default");
			break;
		}
	}
	
	@Test
	public void test5() {
		int score1 = 34;
		int score2 = 74;
		int score3 = 84;
		int score4 = 94;
		int sum = score1 + score2 + score3 + score4;
		
		int[] scores = {34, 74, 84, 97};
		int[] array = new int[4]; 
		array[0] = 99;
		array[1] = 78;
		array[2] = 89;
		array[3] = 45;
		System.out.println(array.length);
		for (int i = 0; i <= array.length - 1; i++) {
			System.out.println(array[i]);
		}
		
		for (int i = 0; i < array.length; i++) {
			System.out.println(array[i]);
		}
		
		for (int i = array.length - 1; i>=0 ; i--) {
			System.out.println(array[i]);
		}
		
	}
	
	
	
}
